<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<div id="bp_count_down_div"> </div> 
<script language="JavaScript"> 
	var bp_date_target = new Date("December 25, 2013 00:00:00");//Mốc thời gian cần đếm(tháng ghi bằng chữ) 
	var bp_date_now = new Date(); 
	var bp_count_down_complete_message = "Chúc Giáng Sinh Vui Vẻ";//Lời chúc khi tới giáng sinh 
	if (bp_date_now >= bp_date_target) {
		document.getElementById("bp_count_down_div").innerHTML = bp_count_down_complete_message;
	} else { 
		bp_time_difference = Math.floor(((bp_date_target - bp_date_now).valueOf()) / 1000);
		display_time_difference(bp_time_difference);
	}
	function display_time_difference(bp_time_difference) {
		if (bp_time_difference <= 0) {
			document.getElementById("bp_count_down_div").innerHTML = bp_count_down_complete_message;
			return;
		}
		bp_count_down_message = bp_format_seconds(bp_time_difference, 86400, 100000) + " Ngày " + bp_format_seconds(bp_time_difference, 3600, 24) + " Giờ " + bp_format_seconds(bp_time_difference, 60, 60) + " Phút " + bp_format_seconds(bp_time_difference, 1, 60) + " Giây là tới Giáng Sinh";
		document.getElementById("bp_count_down_div").innerHTML = bp_count_down_message;
		setTimeout("display_time_difference(" + (bp_time_difference - 1) + ")", 1000);
	}
	function bp_format_seconds(secs, num1, num2) { 
		num = ((Math.floor(secs / num1)) % num2).toString();
		if (num.length < 2) s = "0" + num;
		return "" + num + "";
	} 
</script>
</body>
</html>